def is_odd_even(value):
    try:
        num = int(value)
        return 'odd' if num % 2 != 0 else 'even'
    except ValueError:
        return 'invalid'

def process_inputs():
    try:
        count = int(input("How many values will be entered? "))
        if count <= 0:
            print(f"Invalid number of values: {count}")
            return
    except ValueError:
        print("Input is not a valid number.")
        return

    odd_count = 0
    even_count = 0
    valid_numbers = []

    for i in range(1, count + 1):
        value = input(f"Please enter value #{i}: ")
        result = is_odd_even(value)
        
        if result == 'odd':
            odd_count += 1
            valid_numbers.append(value)
        elif result == 'even':
            even_count += 1
            valid_numbers.append(value)
        else:
            print(f"Invalid input: {value}")

    print(f"Entered numbers: {len(valid_numbers)} odd: {odd_count} even: {even_count}")

# 调用函数运行程序
process_inputs()
